<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PID_Study: E:/STM32CubeIDEWorkspace/noRTOS/PID_Study/Drivers/Algorithm/Inc/pid.h 源文件</title>
<link rel="icon" href="Doxygen-55px.png" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="Doxygen-55px.png"/></td>
  <td id="projectalign">
   <div id="projectname">PID_Study<span id="projectnumber">&#160;v1.0.0</span>
   </div>
   <div id="projectbrief">doc for PID_Study</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a href="dir_0c97d201d54b8b5817233953fc3aadb6.html">STM32CubeIDEWorkspace</a></li><li class="navelem"><a href="dir_f3310f12da31771255acec658cd4246d.html">noRTOS</a></li><li class="navelem"><a href="dir_8022218a35d1971722714ae72b00e870.html">PID_Study</a></li><li class="navelem"><a href="dir_17bc370c857333bc4166d76f67bb735c.html">Drivers</a></li><li class="navelem"><a href="dir_e69a281451c2b8e1f92d152816da16da.html">Algorithm</a></li><li class="navelem"><a href="dir_3bdb93e34c040a49dad5fa6bfdf8cbfd.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">pid.h</div></div>
</div><!--header-->
<div class="contents">
<a href="pid_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#ifndef __PID_H_</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#define __PID_H_</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;main.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span></div>
<div class="foldopen" id="foldopen00017" data-start="{" data-end="};">
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="struct_p_i_d___error.html">   17</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span>{</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="struct_p_i_d___error.html#a1fd25b0998be7110775151a3a3d32eda">   19</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___error.html#a1fd25b0998be7110775151a3a3d32eda">previous2</a>; </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="struct_p_i_d___error.html#a1800f4540e1f11ca5e521792f09829ae">   20</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___error.html#a1800f4540e1f11ca5e521792f09829ae">previous</a>;  </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="struct_p_i_d___error.html#af9653d31acfffa5a40aa709b2065e00b">   21</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___error.html#af9653d31acfffa5a40aa709b2065e00b">current</a>;   </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="struct_p_i_d___error.html#a1174af01b8a329a6d465ea6e0951b3e5">   22</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___error.html#a1174af01b8a329a6d465ea6e0951b3e5">integral</a>;  </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span>} <a class="code hl_struct" href="struct_p_i_d___error.html">PID_Error</a>;</div>
</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span></div>
<div class="foldopen" id="foldopen00028" data-start="{" data-end="};">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="struct_p_i_d___parameter.html">   28</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>{</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="struct_p_i_d___parameter.html#a1f7add0f84d583bc2eceb290d6c4cc06">   30</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___parameter.html#a1f7add0f84d583bc2eceb290d6c4cc06">kp</a>;                    </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="struct_p_i_d___parameter.html#a050993b7ca6c97e62c1020017f716b91">   31</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___parameter.html#a050993b7ca6c97e62c1020017f716b91">ki</a>;                    </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="struct_p_i_d___parameter.html#ae7a5c6018507bb1361fcca170e069b9c">   32</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___parameter.html#ae7a5c6018507bb1361fcca170e069b9c">kd</a>;                    </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="struct_p_i_d___parameter.html#a8316c26d84f05bc0d80143ecbb3d3590">   33</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___parameter.html#a8316c26d84f05bc0d80143ecbb3d3590">filter_for_D</a>;          </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="struct_p_i_d___parameter.html#af712e5b056badba866e04e8e6dcc5f73">   34</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___parameter.html#af712e5b056badba866e04e8e6dcc5f73">error_tolerance_range</a>; </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="struct_p_i_d___parameter.html#a6758f23340adab90496da0d83ff2280b">   35</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___parameter.html#a6758f23340adab90496da0d83ff2280b">Gearshift_Integral</a>;    </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>} <a class="code hl_struct" href="struct_p_i_d___parameter.html">PID_Parameter</a>;</div>
</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span></div>
<div class="foldopen" id="foldopen00041" data-start="{" data-end="};">
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="struct_p_i_d___input.html">   41</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>{</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="struct_p_i_d___input.html#af0df2177301e4061ab72ade2ea437bcd">   43</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___input.html#af0df2177301e4061ab72ade2ea437bcd">target</a>;           </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="struct_p_i_d___input.html#aff03bbf3694fd644f7f00227ad0d6f2b">   44</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___input.html#aff03bbf3694fd644f7f00227ad0d6f2b">actual</a>;           </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="struct_p_i_d___input.html#ad013a6a57530377a39c0c4602b336f2d">   45</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___input.html#ad013a6a57530377a39c0c4602b336f2d">actual_previous</a>;  </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="struct_p_i_d___input.html#a034ef7a53e57fd254948f3f7a7895caf">   46</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___input.html#a034ef7a53e57fd254948f3f7a7895caf">actual_previous2</a>; </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>} <a class="code hl_struct" href="struct_p_i_d___input.html">PID_Input</a>;</div>
</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span></div>
<div class="foldopen" id="foldopen00052" data-start="{" data-end="};">
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="struct_p_i_d___output.html">   52</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>{</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="struct_p_i_d___output.html#a17956fe0129d3d4c94ebc06cfef2ad82">   54</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___output.html#a17956fe0129d3d4c94ebc06cfef2ad82">value</a>;       </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="struct_p_i_d___output.html#a3e60b3c561be982d7c8e23f14c01fd5b">   55</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___output.html#a3e60b3c561be982d7c8e23f14c01fd5b">offset</a>;      </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="struct_p_i_d___output.html#a7010cdccfed0200584ad63025d0f1a5d">   56</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___output.html#a7010cdccfed0200584ad63025d0f1a5d">variation</a>;   </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="struct_p_i_d___output.html#adb436defe3c793713fadbff4c04eaebf">   57</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___output.html#adb436defe3c793713fadbff4c04eaebf">upper_limit</a>; </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="struct_p_i_d___output.html#aa6702f5ca985a5b97e1534be9d374bba">   58</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_p_i_d___output.html#aa6702f5ca985a5b97e1534be9d374bba">D</a>;           </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>} <a class="code hl_struct" href="struct_p_i_d___output.html">PID_Output</a>;</div>
</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="pid_8h.html#a627e3fb87dec0be34a713dd02143e0ae">   62</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="pid_8h.html#a627e3fb87dec0be34a713dd02143e0ae">Pid_Control</a>)(float);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="pid_8h.html#aa296db43b5b2801baa50c80aeda1dbc5">   65</a></span><span class="keyword">typedef</span> float (*<a class="code hl_typedef" href="pid_8h.html#aa296db43b5b2801baa50c80aeda1dbc5">Pid_Gearshift_Integral</a>)(float);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span></div>
<div class="foldopen" id="foldopen00070" data-start="{" data-end="};">
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="struct_p_i_d.html">   70</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>{</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="struct_p_i_d.html#a92fb47b3f94330fde1640fe860a09202">   72</a></span>    <a class="code hl_struct" href="struct_p_i_d___input.html">PID_Input</a> <a class="code hl_variable" href="struct_p_i_d.html#a92fb47b3f94330fde1640fe860a09202">input</a>;                             </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="struct_p_i_d.html#aca1fc96770b863c3b496570fe4b45834">   73</a></span>    <a class="code hl_struct" href="struct_p_i_d___output.html">PID_Output</a> <a class="code hl_variable" href="struct_p_i_d.html#aca1fc96770b863c3b496570fe4b45834">output</a>;                           </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="struct_p_i_d.html#a2daf21e35c0bba3079555a0781ef3f95">   74</a></span>    <a class="code hl_struct" href="struct_p_i_d___parameter.html">PID_Parameter</a> <a class="code hl_variable" href="struct_p_i_d.html#a2daf21e35c0bba3079555a0781ef3f95">parameter</a>;                     </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="struct_p_i_d.html#aa0de6579fcac50dff3a83cc28976eff5">   75</a></span>    <a class="code hl_struct" href="struct_p_i_d___error.html">PID_Error</a> <a class="code hl_variable" href="struct_p_i_d.html#aa0de6579fcac50dff3a83cc28976eff5">error</a>;                             </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="struct_p_i_d.html#ae54a6eb404a0e1425b9dd25c47a7a4eb">   76</a></span>    <a class="code hl_typedef" href="pid_8h.html#a627e3fb87dec0be34a713dd02143e0ae">Pid_Control</a> <a class="code hl_variable" href="struct_p_i_d.html#ae54a6eb404a0e1425b9dd25c47a7a4eb">pidControl</a>;                      </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="struct_p_i_d.html#a3f9c77e4705db6e98768995c879c104a">   77</a></span>    <a class="code hl_typedef" href="pid_8h.html#aa296db43b5b2801baa50c80aeda1dbc5">Pid_Gearshift_Integral</a> <a class="code hl_variable" href="struct_p_i_d.html#a3f9c77e4705db6e98768995c879c104a">pidGearshiftIntegral</a>; </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>} <a class="code hl_struct" href="struct_p_i_d.html">PID</a>;</div>
</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="comment">// Function declarations</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span><span class="keywordtype">void</span> <a class="code hl_function" href="pid_8h.html#a6e747b3297150c5ee417b6164a837c90">PID_Init</a>(<a class="code hl_struct" href="struct_p_i_d.html">PID</a> *pid, <span class="keywordtype">float</span> kp, <span class="keywordtype">float</span> ki, <span class="keywordtype">float</span> kd, <span class="keywordtype">float</span> output_offset,</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>              <span class="keywordtype">float</span> output_upper_limit, <span class="keywordtype">float</span> parameter_filter_for_D,</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>              <span class="keywordtype">float</span> error_tolerance_range, <a class="code hl_typedef" href="pid_8h.html#a627e3fb87dec0be34a713dd02143e0ae">Pid_Control</a> pidControl,</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>              <a class="code hl_typedef" href="pid_8h.html#aa296db43b5b2801baa50c80aeda1dbc5">Pid_Gearshift_Integral</a> pidGearshiftIntegral);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="keywordtype">void</span> <a class="code hl_function" href="pid_8h.html#a0f8187ea607fc1553a4955eaeaab92f6">PID_Parameter_Set</a>(<a class="code hl_struct" href="struct_p_i_d.html">PID</a> *pid, <span class="keywordtype">float</span> kp, <span class="keywordtype">float</span> ki, <span class="keywordtype">float</span> kd);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="keywordtype">void</span> <a class="code hl_function" href="pid_8h.html#aa3fdc3d1dbfd04b47480ba94435e3b43">PID_Target_Set</a>(<a class="code hl_struct" href="struct_p_i_d.html">PID</a> *pid, <span class="keywordtype">float</span> target);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span><span class="keywordtype">float</span> <a class="code hl_function" href="pid_8h.html#aee0c7e9b4314105045e35d8cbce24401">PID_Target_Get</a>(<a class="code hl_struct" href="struct_p_i_d.html">PID</a> pid);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="keywordtype">float</span> <a class="code hl_function" href="pid_8h.html#acac180b4e5e5ed6147bd0b3a61423b96">PID_Output_Get</a>(<a class="code hl_struct" href="struct_p_i_d.html">PID</a> pid);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="keywordtype">void</span> <a class="code hl_function" href="pid_8h.html#a17d347eed7455c0911b5bc1f01261841">PID_Regulation_Position</a>(<a class="code hl_struct" href="struct_p_i_d.html">PID</a> *pid, <span class="keywordtype">float</span> actual);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="keywordtype">void</span> <a class="code hl_function" href="pid_8h.html#a01bc0b228b9cbd07d26ce2e440462fb6">PID_Regulation_Incremental</a>(<a class="code hl_struct" href="struct_p_i_d.html">PID</a> *pid, <span class="keywordtype">float</span> actual);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="preprocessor">#endif </span><span class="comment">/* __PID_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="apid_8h_html_a01bc0b228b9cbd07d26ce2e440462fb6"><div class="ttname"><a href="pid_8h.html#a01bc0b228b9cbd07d26ce2e440462fb6">PID_Regulation_Incremental</a></div><div class="ttdeci">void PID_Regulation_Incremental(PID *pid, float actual)</div><div class="ttdoc">Execute incremental PID regulation</div><div class="ttdef"><b>定义</b> pid.c:230</div></div>
<div class="ttc" id="apid_8h_html_a0f8187ea607fc1553a4955eaeaab92f6"><div class="ttname"><a href="pid_8h.html#a0f8187ea607fc1553a4955eaeaab92f6">PID_Parameter_Set</a></div><div class="ttdeci">void PID_Parameter_Set(PID *pid, float kp, float ki, float kd)</div><div class="ttdoc">Set PID parameters (Kp, Ki, Kd)</div><div class="ttdef"><b>定义</b> pid.c:20</div></div>
<div class="ttc" id="apid_8h_html_a17d347eed7455c0911b5bc1f01261841"><div class="ttname"><a href="pid_8h.html#a17d347eed7455c0911b5bc1f01261841">PID_Regulation_Position</a></div><div class="ttdeci">void PID_Regulation_Position(PID *pid, float actual)</div><div class="ttdoc">Execute positional PID regulation</div><div class="ttdef"><b>定义</b> pid.c:189</div></div>
<div class="ttc" id="apid_8h_html_a627e3fb87dec0be34a713dd02143e0ae"><div class="ttname"><a href="pid_8h.html#a627e3fb87dec0be34a713dd02143e0ae">Pid_Control</a></div><div class="ttdeci">void(* Pid_Control)(float)</div><div class="ttdoc">Callback function type for control output</div><div class="ttdef"><b>定义</b> pid.h:62</div></div>
<div class="ttc" id="apid_8h_html_a6e747b3297150c5ee417b6164a837c90"><div class="ttname"><a href="pid_8h.html#a6e747b3297150c5ee417b6164a837c90">PID_Init</a></div><div class="ttdeci">void PID_Init(PID *pid, float kp, float ki, float kd, float output_offset, float output_upper_limit, float parameter_filter_for_D, float error_tolerance_range, Pid_Control pidControl, Pid_Gearshift_Integral pidGearshiftIntegral)</div><div class="ttdoc">Initialize PID controller with all parameters</div><div class="ttdef"><b>定义</b> pid.c:76</div></div>
<div class="ttc" id="apid_8h_html_aa296db43b5b2801baa50c80aeda1dbc5"><div class="ttname"><a href="pid_8h.html#aa296db43b5b2801baa50c80aeda1dbc5">Pid_Gearshift_Integral</a></div><div class="ttdeci">float(* Pid_Gearshift_Integral)(float)</div><div class="ttdoc">Callback function type for variable integral gain</div><div class="ttdef"><b>定义</b> pid.h:65</div></div>
<div class="ttc" id="apid_8h_html_aa3fdc3d1dbfd04b47480ba94435e3b43"><div class="ttname"><a href="pid_8h.html#aa3fdc3d1dbfd04b47480ba94435e3b43">PID_Target_Set</a></div><div class="ttdeci">void PID_Target_Set(PID *pid, float target)</div><div class="ttdoc">Set target value for PID controller</div><div class="ttdef"><b>定义</b> pid.c:95</div></div>
<div class="ttc" id="apid_8h_html_acac180b4e5e5ed6147bd0b3a61423b96"><div class="ttname"><a href="pid_8h.html#acac180b4e5e5ed6147bd0b3a61423b96">PID_Output_Get</a></div><div class="ttdeci">float PID_Output_Get(PID pid)</div><div class="ttdoc">Get current output value from PID controller</div><div class="ttdef"><b>定义</b> pid.c:113</div></div>
<div class="ttc" id="apid_8h_html_aee0c7e9b4314105045e35d8cbce24401"><div class="ttname"><a href="pid_8h.html#aee0c7e9b4314105045e35d8cbce24401">PID_Target_Get</a></div><div class="ttdeci">float PID_Target_Get(PID pid)</div><div class="ttdoc">Get current target value from PID controller</div><div class="ttdef"><b>定义</b> pid.c:104</div></div>
<div class="ttc" id="astruct_p_i_d___error_html"><div class="ttname"><a href="struct_p_i_d___error.html">PID_Error</a></div><div class="ttdoc">PID error structure</div><div class="ttdef"><b>定义</b> pid.h:18</div></div>
<div class="ttc" id="astruct_p_i_d___error_html_a1174af01b8a329a6d465ea6e0951b3e5"><div class="ttname"><a href="struct_p_i_d___error.html#a1174af01b8a329a6d465ea6e0951b3e5">PID_Error::integral</a></div><div class="ttdeci">float integral</div><div class="ttdef"><b>定义</b> pid.h:22</div></div>
<div class="ttc" id="astruct_p_i_d___error_html_a1800f4540e1f11ca5e521792f09829ae"><div class="ttname"><a href="struct_p_i_d___error.html#a1800f4540e1f11ca5e521792f09829ae">PID_Error::previous</a></div><div class="ttdeci">float previous</div><div class="ttdef"><b>定义</b> pid.h:20</div></div>
<div class="ttc" id="astruct_p_i_d___error_html_a1fd25b0998be7110775151a3a3d32eda"><div class="ttname"><a href="struct_p_i_d___error.html#a1fd25b0998be7110775151a3a3d32eda">PID_Error::previous2</a></div><div class="ttdeci">float previous2</div><div class="ttdef"><b>定义</b> pid.h:19</div></div>
<div class="ttc" id="astruct_p_i_d___error_html_af9653d31acfffa5a40aa709b2065e00b"><div class="ttname"><a href="struct_p_i_d___error.html#af9653d31acfffa5a40aa709b2065e00b">PID_Error::current</a></div><div class="ttdeci">float current</div><div class="ttdef"><b>定义</b> pid.h:21</div></div>
<div class="ttc" id="astruct_p_i_d___input_html"><div class="ttname"><a href="struct_p_i_d___input.html">PID_Input</a></div><div class="ttdoc">PID input structure</div><div class="ttdef"><b>定义</b> pid.h:42</div></div>
<div class="ttc" id="astruct_p_i_d___input_html_a034ef7a53e57fd254948f3f7a7895caf"><div class="ttname"><a href="struct_p_i_d___input.html#a034ef7a53e57fd254948f3f7a7895caf">PID_Input::actual_previous2</a></div><div class="ttdeci">float actual_previous2</div><div class="ttdef"><b>定义</b> pid.h:46</div></div>
<div class="ttc" id="astruct_p_i_d___input_html_ad013a6a57530377a39c0c4602b336f2d"><div class="ttname"><a href="struct_p_i_d___input.html#ad013a6a57530377a39c0c4602b336f2d">PID_Input::actual_previous</a></div><div class="ttdeci">float actual_previous</div><div class="ttdef"><b>定义</b> pid.h:45</div></div>
<div class="ttc" id="astruct_p_i_d___input_html_af0df2177301e4061ab72ade2ea437bcd"><div class="ttname"><a href="struct_p_i_d___input.html#af0df2177301e4061ab72ade2ea437bcd">PID_Input::target</a></div><div class="ttdeci">float target</div><div class="ttdef"><b>定义</b> pid.h:43</div></div>
<div class="ttc" id="astruct_p_i_d___input_html_aff03bbf3694fd644f7f00227ad0d6f2b"><div class="ttname"><a href="struct_p_i_d___input.html#aff03bbf3694fd644f7f00227ad0d6f2b">PID_Input::actual</a></div><div class="ttdeci">float actual</div><div class="ttdef"><b>定义</b> pid.h:44</div></div>
<div class="ttc" id="astruct_p_i_d___output_html"><div class="ttname"><a href="struct_p_i_d___output.html">PID_Output</a></div><div class="ttdoc">PID output structure</div><div class="ttdef"><b>定义</b> pid.h:53</div></div>
<div class="ttc" id="astruct_p_i_d___output_html_a17956fe0129d3d4c94ebc06cfef2ad82"><div class="ttname"><a href="struct_p_i_d___output.html#a17956fe0129d3d4c94ebc06cfef2ad82">PID_Output::value</a></div><div class="ttdeci">float value</div><div class="ttdef"><b>定义</b> pid.h:54</div></div>
<div class="ttc" id="astruct_p_i_d___output_html_a3e60b3c561be982d7c8e23f14c01fd5b"><div class="ttname"><a href="struct_p_i_d___output.html#a3e60b3c561be982d7c8e23f14c01fd5b">PID_Output::offset</a></div><div class="ttdeci">float offset</div><div class="ttdef"><b>定义</b> pid.h:55</div></div>
<div class="ttc" id="astruct_p_i_d___output_html_a7010cdccfed0200584ad63025d0f1a5d"><div class="ttname"><a href="struct_p_i_d___output.html#a7010cdccfed0200584ad63025d0f1a5d">PID_Output::variation</a></div><div class="ttdeci">float variation</div><div class="ttdef"><b>定义</b> pid.h:56</div></div>
<div class="ttc" id="astruct_p_i_d___output_html_aa6702f5ca985a5b97e1534be9d374bba"><div class="ttname"><a href="struct_p_i_d___output.html#aa6702f5ca985a5b97e1534be9d374bba">PID_Output::D</a></div><div class="ttdeci">float D</div><div class="ttdef"><b>定义</b> pid.h:58</div></div>
<div class="ttc" id="astruct_p_i_d___output_html_adb436defe3c793713fadbff4c04eaebf"><div class="ttname"><a href="struct_p_i_d___output.html#adb436defe3c793713fadbff4c04eaebf">PID_Output::upper_limit</a></div><div class="ttdeci">float upper_limit</div><div class="ttdef"><b>定义</b> pid.h:57</div></div>
<div class="ttc" id="astruct_p_i_d___parameter_html"><div class="ttname"><a href="struct_p_i_d___parameter.html">PID_Parameter</a></div><div class="ttdoc">PID parameters structure</div><div class="ttdef"><b>定义</b> pid.h:29</div></div>
<div class="ttc" id="astruct_p_i_d___parameter_html_a050993b7ca6c97e62c1020017f716b91"><div class="ttname"><a href="struct_p_i_d___parameter.html#a050993b7ca6c97e62c1020017f716b91">PID_Parameter::ki</a></div><div class="ttdeci">float ki</div><div class="ttdef"><b>定义</b> pid.h:31</div></div>
<div class="ttc" id="astruct_p_i_d___parameter_html_a1f7add0f84d583bc2eceb290d6c4cc06"><div class="ttname"><a href="struct_p_i_d___parameter.html#a1f7add0f84d583bc2eceb290d6c4cc06">PID_Parameter::kp</a></div><div class="ttdeci">float kp</div><div class="ttdef"><b>定义</b> pid.h:30</div></div>
<div class="ttc" id="astruct_p_i_d___parameter_html_a6758f23340adab90496da0d83ff2280b"><div class="ttname"><a href="struct_p_i_d___parameter.html#a6758f23340adab90496da0d83ff2280b">PID_Parameter::Gearshift_Integral</a></div><div class="ttdeci">float Gearshift_Integral</div><div class="ttdef"><b>定义</b> pid.h:35</div></div>
<div class="ttc" id="astruct_p_i_d___parameter_html_a8316c26d84f05bc0d80143ecbb3d3590"><div class="ttname"><a href="struct_p_i_d___parameter.html#a8316c26d84f05bc0d80143ecbb3d3590">PID_Parameter::filter_for_D</a></div><div class="ttdeci">float filter_for_D</div><div class="ttdef"><b>定义</b> pid.h:33</div></div>
<div class="ttc" id="astruct_p_i_d___parameter_html_ae7a5c6018507bb1361fcca170e069b9c"><div class="ttname"><a href="struct_p_i_d___parameter.html#ae7a5c6018507bb1361fcca170e069b9c">PID_Parameter::kd</a></div><div class="ttdeci">float kd</div><div class="ttdef"><b>定义</b> pid.h:32</div></div>
<div class="ttc" id="astruct_p_i_d___parameter_html_af712e5b056badba866e04e8e6dcc5f73"><div class="ttname"><a href="struct_p_i_d___parameter.html#af712e5b056badba866e04e8e6dcc5f73">PID_Parameter::error_tolerance_range</a></div><div class="ttdeci">float error_tolerance_range</div><div class="ttdef"><b>定义</b> pid.h:34</div></div>
<div class="ttc" id="astruct_p_i_d_html"><div class="ttname"><a href="struct_p_i_d.html">PID</a></div><div class="ttdoc">Main PID controller structure</div><div class="ttdef"><b>定义</b> pid.h:71</div></div>
<div class="ttc" id="astruct_p_i_d_html_a2daf21e35c0bba3079555a0781ef3f95"><div class="ttname"><a href="struct_p_i_d.html#a2daf21e35c0bba3079555a0781ef3f95">PID::parameter</a></div><div class="ttdeci">PID_Parameter parameter</div><div class="ttdef"><b>定义</b> pid.h:74</div></div>
<div class="ttc" id="astruct_p_i_d_html_a3f9c77e4705db6e98768995c879c104a"><div class="ttname"><a href="struct_p_i_d.html#a3f9c77e4705db6e98768995c879c104a">PID::pidGearshiftIntegral</a></div><div class="ttdeci">Pid_Gearshift_Integral pidGearshiftIntegral</div><div class="ttdef"><b>定义</b> pid.h:77</div></div>
<div class="ttc" id="astruct_p_i_d_html_a92fb47b3f94330fde1640fe860a09202"><div class="ttname"><a href="struct_p_i_d.html#a92fb47b3f94330fde1640fe860a09202">PID::input</a></div><div class="ttdeci">PID_Input input</div><div class="ttdef"><b>定义</b> pid.h:72</div></div>
<div class="ttc" id="astruct_p_i_d_html_aa0de6579fcac50dff3a83cc28976eff5"><div class="ttname"><a href="struct_p_i_d.html#aa0de6579fcac50dff3a83cc28976eff5">PID::error</a></div><div class="ttdeci">PID_Error error</div><div class="ttdef"><b>定义</b> pid.h:75</div></div>
<div class="ttc" id="astruct_p_i_d_html_aca1fc96770b863c3b496570fe4b45834"><div class="ttname"><a href="struct_p_i_d.html#aca1fc96770b863c3b496570fe4b45834">PID::output</a></div><div class="ttdeci">PID_Output output</div><div class="ttdef"><b>定义</b> pid.h:73</div></div>
<div class="ttc" id="astruct_p_i_d_html_ae54a6eb404a0e1425b9dd25c47a7a4eb"><div class="ttname"><a href="struct_p_i_d.html#ae54a6eb404a0e1425b9dd25c47a7a4eb">PID::pidControl</a></div><div class="ttdeci">Pid_Control pidControl</div><div class="ttdef"><b>定义</b> pid.h:76</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
